package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type GoodsInfoRouter struct {
}

// InitGoodsInfoRouter 初始化 GoodsInfo 路由信息
func (s *GoodsInfoRouter) InitGoodsInfoRouter(Router *gin.RouterGroup) {
	goodsInfoRouter := Router.Group("goodsInfo").Use(middleware.OperationRecord())
	goodsInfoRouterWithoutRecord := Router.Group("goodsInfo")
	var goodsInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.GoodsInfoApi
	{
		goodsInfoRouter.POST("createGoodsInfo", goodsInfoApi.CreateGoodsInfo)             // 新建GoodsInfo
		goodsInfoRouter.DELETE("deleteGoodsInfo", goodsInfoApi.DeleteGoodsInfo)           // 删除GoodsInfo
		goodsInfoRouter.DELETE("deleteGoodsInfoByIds", goodsInfoApi.DeleteGoodsInfoByIds) // 批量删除GoodsInfo
		goodsInfoRouter.PUT("updateGoodsInfo", goodsInfoApi.UpdateGoodsInfo)              // 更新GoodsInfo
	}
	{
		goodsInfoRouterWithoutRecord.GET("findGoodsInfo", goodsInfoApi.FindGoodsInfo)             // 根据ID获取GoodsInfo
		goodsInfoRouterWithoutRecord.GET("getGoodsInfoList", goodsInfoApi.GetGoodsInfoList)       // 获取GoodsInfo列表
		goodsInfoRouterWithoutRecord.GET("getGoodsInfoListDay", goodsInfoApi.GetGoodsInfoListDay) // 获取GoodsInfo列表
	}
}
